package com.heaven.map.controller;


import com.heaven.map.pojo.vo.ResponseInfo;
import com.heaven.map.pojo.po.TAdmin;
import com.heaven.map.service.ITAdminService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Heaven
 * @since 2021-10-03
 */
@RestController
@RequestMapping("/api/v1")
public class TAdminController {
    private static final Logger log = LoggerFactory.getLogger(TAdminController.class);
    @Autowired
    private ITAdminService itAdminService;
    @PostMapping("/verify")
    public ResponseInfo verify(@RequestBody TAdmin tAdmin){
        return itAdminService.verify(tAdmin);
    }
    @PostMapping("/modify")
    public ResponseInfo modify(String password,@RequestHeader("token") String token){
        log.debug(password+token);
        return itAdminService.modify(password,token);
    }

//    public ResponseInfo verifyToken(@RequestParam("token") String token){
//
//    }
}

